Matlab Codes

Chapter 3

Matlab code 3.7: Matlab file “Figure 3-20.m”

%--------------------------------------------------------------------

% This code can be used to generate Figure 3.20

%--------------------------------------------------------------------

 

clear all

close all

%% the micro-Doppler effect of the rotating and vibrating target(LFMCW radar)

c = 3e8;

j = sqrt(-1);

fc = 35e9; % carrier frequency

tp = 1e-3; % pulse duration

B = 500e6; % bandwidth

mu = B/tp; % frequency modulation rate

Rq = 3; % distance between the vibrating centre and reference point

R0 = 5000; % distance between the radar and reference point

rho = 6; % amplitude 

omega = 8*pi; % angular frequency

thet0 = 0; % initial phase

t = 1; % radar illumimated time

f0 = 1e6;

tk = 0:1/f0:tp-1/f0; % fast time

m = length(tk);

prf = 1000; % pulse repetition frequency

pri = 1/prf; % pulse repetition interval

dt = 0:pri:t-pri; % slow time sampling interval

nt = length(dt);

df = f0/m;

s = zeros(m,nt); % echo signal matrix

sdt = zeros(m,nt);

td0 = tk' - 2*R0/c;

s0 = exp(j*2*pi*(fc*td0+0.5*mu*td0.^2)); % reference signal

for i = 1:nt

    R = R0+Rq+rho*cos(omega*dt(i)+thet0)-rho*omega*sin(omega*dt(i)+thet0)*tk;

    td = tk'-2*R'/c; % echo delay

    s(:,i) = s(:,i)+exp(j*2*pi*(fc*td+0.5*mu*td.^2));

    sdt(:,i) = s(:,i).*conj(s0(:)); % dechirp

end

sdhp = fftshift(fft(sdt));

figure

contour(0:pri:t-pri,(-f0/2:df:f0/2-df)*(-c/2/mu),abs(sdhp))

xlabel('Slow time (s)')

ylabel('Range (m)')

axis([0,1,-25,25])